#pragma once

#include "ctableviewdelegate.h"

#include <QTableView>
//#include <QStandardItemModel>
#include <QGraphicsSceneHoverEvent>
#include <QHeaderView>
#include <QMouseEvent>

class CTableView : public QTableView
{
    Q_OBJECT

public:
    explicit CTableView(QWidget *parent = nullptr);
    virtual ~CTableView() override;

protected:
//    virtual void enterEvent(QEvent *e) override;
//    virtual void leaveEvent(QEvent *e) override;

    virtual bool eventFilter(QObject *obj, QEvent *event) override;

//    virtual void mouseReleaseEvent(QMouseEvent *event) override;

private:
    void updateCurrentHoveringRow();

private:
    CTableViewDelegate *m_delegate;
    int m_currentHoveringRow;
};
